using System;
using Tarkin.InfrastructureLibrary.Core.PrimitiveTypes;
using NUnit.Framework;

namespace Tarkin.InfrastructureLibrary.Tests.Core.PrimitiveTypes
{
    /// <summary>
    /// UnlimitedNaturalTests is the NUnit TestFixture for the Tarkin.InfrastructureLibrary.Core.PrimitiveTypes.UnlimitedNatural class.
    /// </summary>
    [TestFixture]
    public class UnlimitedNaturalTests
    {
        [Test]
        public void TestDefaultConstruction ()
        {
            UnlimitedNatural unlimitedNatural = new UnlimitedNatural ();

            Assert.AreEqual ( "0", unlimitedNatural.Value );
        }

        [Test]
        public void TestOverloadedConstructionUnlimitedValue ()
        {
            UnlimitedNatural unlimitedNatural = new UnlimitedNatural ( UnlimitedNatural.UnlimitedNaturalInfinity );

            Assert.AreEqual ( UnlimitedNatural.UnlimitedNaturalInfinity, unlimitedNatural.Value );
        }

        [Test]
        public void TestOverloadedConstructionValueOf1000 ()
        {
            UnlimitedNatural unlimitedNatural = new UnlimitedNatural ( "1000" );

            Assert.AreEqual ( "1000", unlimitedNatural.Value );
        }

        [Test]
        [ExpectedException(typeof(ArgumentException))]
        public void TestOverloadedConstructionValueOfABC ()
        {
            UnlimitedNatural unlimitedNatural = new UnlimitedNatural ( "ABC" );
        }

        [Test]
        [ExpectedException ( typeof ( ArgumentException ) )]
        public void TestOverloadedConstructionValueOfNegative1000 ()
        {
            UnlimitedNatural unlimitedNatural = new UnlimitedNatural ( "-1000" );
        }
    }
}
